﻿<!--blog正文区域-->
@using MyWebProject.Models.QueryResult;
@using MyWebProject.Models.Entity

<div class="col-md-8">
    <!--blog正文-->
    <div class="row">
        <div class="row">
            <div class="col-md-12 welcome-left">
                @{List<SnippetResult> list = Model as List<SnippetResult>;
                    foreach (SnippetResult s in list)
                    {
                        <h3>@s.MAIN_TITLE</h3>
                        <h4>@s.SECOND_TITLE</h4>
                        <ul class="list-inline">
                            <li>
                                @foreach (TAG_INFO t in s.tag_info)
                                {
                                    <a href="javascript:void(0)" onclick="searchPost('@t.TAG_NAME')"><span class="label label-primary">@t.TAG_NAME</span></a> }
                            </li>
                            <li>
                                <p>@s.DATE</p>
                            </li>
                            <li>
                                <p>阅读次数:@s.VIEW_COUNT</p>
                            </li>
                            <li>
                                <p>点赞次数:@s.PRAISE_COUNT</p>
                            </li>
                            <li>
                                <p>转载次数:@s.REPRODUCED_COUNT</p>
                            </li>
                        </ul>
                        <hr style="color:black" />
                        <div id="postContent">
                            @Html.Raw(System.Web.HttpUtility.HtmlDecode(s.POST_CONTENT))
                        </div>
                        <input style="visibility:collapse" id="postId" value="@s.POST_ID" />}
                }
            </div>
        </div>
        <hr style="color:black" />
        <div class="row" style="height:200px"></div>
    </div>
</div>
<div class="col-md-1"></div>
<!--留言板start-->
<div class="col-md-3" id="MsgBoardArea"></div>
<!--留言板end-->
<script>
    function getBoardInDetial() {
        var postId = parseInt($('#postId').val());
        $.get('Blog/MsgBoard?postId=' + postId, function (data) {
            $('#MsgBoardArea').html(data);
        });
    }
    getBoardInDetial();
    function a() {
        $('#postContent').children().css('color', 'black');
    }
    a();
</script>